package com.swxc.smartorder.pinyin;


import java.util.Comparator;

/**
 * @author xiaanming
 */
public class PinyinComparator implements Comparator<String> {

    @Override
    public int compare(String o1, String o2) {
        if ("@".equals(o1) || "#".equals(o2)) {
            return -1;
        } else if ("#".equals(o1) || "@".equals(o2)) {
            return 1;
        } else {
            return o1.compareTo(o2);
        }
    }
}
